Automate ReadTheDocs model page updates#704
Open
darrylong wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds automation to keep the ReadTheDocs “Models Available” page’s backing data (docs/source/_static/models/data.js) up-to-date by introducing a GitHub Actions workflow that regenerates and commits the generated file when relevant sources change.
Changes:
- Introduce a new workflow to run
docs/generate_model_js.pyon pushes tomaster(scoped by path filters) and on published releases. - Auto-commit and push
docs/source/_static/models/data.jsonly when the generated output differs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+18
to
+19
| - uses: actions/checkout@v4 | ||
|
|
Comment on lines
+6
to
+8
| paths: | ||
| - 'README.md' | ||
| - 'docs/generate_model_js.py' |
Comment on lines
+9
to
+12
| release: | ||
| types: [published] | ||
|
|
||
| jobs: |
qtuantruong
approved these changes
Jun 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a GitHub Actions workflow (
.github/workflows/update-model-table.yml) that automatically regenerates the models table (docs/source/_static/models/data.js) by runningdocs/generate_model_js.pywhenever relevant files change. The workflow triggers on pushes tomasterthat touchREADME.mdor the generation script, and on published releases. It only commits if the output actually changed, using[skip ci]to avoid recursive runs.The page is viewable at https://cornac.readthedocs.io/en/latest/models/
This removes the need for contributors to manually run the script and push the generated file after each change.
Related Issues
Fixes #647
Checklist:
README.md(if you are adding a new model).examples/README.md(if you are adding a new example).datasets/README.md(if you are adding a new dataset).